﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Hangjing.Model;
using Hangjing.SQLServerDAL;

using System.Text;
using System.Text.RegularExpressions;
using Hangjing.SQLServerDAL.serverinterface;
using Newtonsoft.Json;

/// <summary>
/// 检查通知是否已读取
/// </summary>
public partial class AndroidAPI_Deliver_checknotice : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Clear();

        string did = WebUtility.InputText(Request["did"]);


        apiResultInfo res = new apiResultInfo()
        {
            msg = "",
            state = 1,
        };

        if (new noticereadlog().GetCount("mtype=1 and userid=" + did) > 0)
        {
            res.data = 1;
            res.msg = "通知已读";
        }
        else
        {
            res.data = 0;
            res.msg = "通知未读";
        }


        Response.Write(JsonConvert.SerializeObject(res));
        Response.End();
    }
}
